package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * UserSite entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user_site", catalog = "vcms_0.1")
public class UserSite implements java.io.Serializable {

	// Fields

	private Integer userSiteId;
	private User user;
	private Site site;
	private Integer checkStep;
	private Boolean isAllChannel;

	// Constructors

	/** default constructor */
	public UserSite() {
	}

	/** full constructor */
	public UserSite(User user, Site site, Integer checkStep,
			Boolean isAllChannel) {
		this.user = user;
		this.site = site;
		this.checkStep = checkStep;
		this.isAllChannel = isAllChannel;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "userSiteId", unique = true, nullable = false)
	public Integer getUserSiteId() {
		return this.userSiteId;
	}

	public void setUserSiteId(Integer userSiteId) {
		this.userSiteId = userSiteId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "siteId")
	public Site getSite() {
		return this.site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	@Column(name = "checkStep")
	public Integer getCheckStep() {
		return this.checkStep;
	}

	public void setCheckStep(Integer checkStep) {
		this.checkStep = checkStep;
	}

	@Column(name = "isAllChannel")
	public Boolean getIsAllChannel() {
		return this.isAllChannel;
	}

	public void setIsAllChannel(Boolean isAllChannel) {
		this.isAllChannel = isAllChannel;
	}

}